package com.yu.judge.codesandebox;

import com.yu.judge.model.ExcuteResponse;
import com.yu.judge.model.ExecuteRequest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * 代理类
 */
@Slf4j
@Data
@AllArgsConstructor
public class CodeSandboxProxy implements CodeSandbox{

    private CodeSandbox codeSandbox;

    @Override
    public ExcuteResponse excuteCode(ExecuteRequest excuteRequest) {
       log.info("代码沙箱执行前调用");
        ExcuteResponse excuteResponse = codeSandbox.excuteCode(excuteRequest);
        log.info("代码沙箱执行后调用");
        return excuteResponse;
    }
}
